//
//  LeftMaketTableViewCell.m
//  bitcoin
//
//  Created by  旺链 on 2018/5/25.
//  Copyright © 2018年 比特币. All rights reserved.
//

#import "LeftMaketTableViewCell.h"

@implementation LeftMaketTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)configData:(NSDictionary*)data
{
    self.titleLb.text = data[@"currencyRelation"];
    self.priceLb.text = data[@"price"];
    self.updownLb.text = data[@"upsAndDowns"];
    
    NSString *str = data[@"upsAndDowns"];
    if ([str containsString:@"-"]) {
        //下降
        self.updownLb.textColor = [UIColor colorWithHexString:@"#2CB25A"];
    }else if(str.floatValue == 0){
        
        self.updownLb.textColor = [UIColor lightGrayColor];
    }else{
        //上升
        self.updownLb.textColor = [UIColor colorWithHexString:@"#E1454F"];
    }
}
@end
